\(\int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx\) [21]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 36, antiderivative size = 41 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=\frac {2 B \arctan \left (\frac {\sqrt [3]{a}+2 \sqrt [3]{-b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} \sqrt [3]{a}} \]

[Out]

2/3*B*arctan(1/3*(a^(1/3)+2*(-b)^(1/3)*x)/a^(1/3)*3^(1/2))/a^(1/3)*3^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {1600, 631, 210} \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=\frac {2 B \arctan \left (\frac {\sqrt [3]{a}+2 \sqrt [3]{-b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} \sqrt [3]{a}} \]

[In]

Int[(a^(1/3)*(-b)^(1/3)*B - (-b)^(2/3)*B*x)/(a + b*x^3),x]

[Out]

(2*B*ArcTan[(a^(1/3) + 2*(-b)^(1/3)*x)/(Sqrt[3]*a^(1/3))])/(Sqrt[3]*a^(1/3))

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{-\frac {a^{2/3} (-b)^{2/3}}{b B}+\frac {\sqrt [3]{a} x}{B}+\frac {\sqrt [3]{-b} x^2}{B}} \, dx \\ & = -\frac {(2 B) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 \sqrt [3]{-b} x}{\sqrt [3]{a}}\right )}{\sqrt [3]{a}} \\ & = \frac {2 B \tan ^{-1}\left (\frac {\sqrt [3]{a}+2 \sqrt [3]{-b} x}{\sqrt {3} \sqrt [3]{a}}\right )}{\sqrt {3} \sqrt [3]{a}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(129\) vs. \(2(41)=82\).

Time = 0.06 (sec) , antiderivative size = 129, normalized size of antiderivative = 3.15 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=\frac {\sqrt [3]{-b} B \left (2 \sqrt {3} \left (\sqrt [3]{-b}-\sqrt [3]{b}\right ) \arctan \left (\frac {1-\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a}}}{\sqrt {3}}\right )+\left (\sqrt [3]{-b}+\sqrt [3]{b}\right ) \left (2 \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )-\log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )\right )\right )}{6 \sqrt [3]{a} b^{2/3}} \]

[In]

Integrate[(a^(1/3)*(-b)^(1/3)*B - (-b)^(2/3)*B*x)/(a + b*x^3),x]

[Out]

((-b)^(1/3)*B*(2*Sqrt[3]*((-b)^(1/3) - b^(1/3))*ArcTan[(1 - (2*b^(1/3)*x)/a^(1/3))/Sqrt[3]] + ((-b)^(1/3) + b^
(1/3))*(2*Log[a^(1/3) + b^(1/3)*x] - Log[a^(2/3) - a^(1/3)*b^(1/3)*x + b^(2/3)*x^2])))/(6*a^(1/3)*b^(2/3))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(201\) vs. \(2(30)=60\).

Time = 1.52 (sec) , antiderivative size = 202, normalized size of antiderivative = 4.93

method result size
default \(-B \,b^{\frac {1}{3}} \left (-a^{\frac {1}{3}} \left (\frac {\ln \left (x +\left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {2}{3}}}-\frac {\ln \left (x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{3}} x +\left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 b \left (\frac {a}{b}\right )^{\frac {2}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {a}{b}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {2}{3}}}\right )+\left (-b \right )^{\frac {1}{3}} \left (-\frac {\ln \left (x +\left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}+\frac {\ln \left (x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{3}} x +\left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {a}{b}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 b \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )\right ) \left (-1\right )^{\frac {1}{3}}\) \(202\)

[In]

int((a^(1/3)*(-b)^(1/3)*B-(-b)^(2/3)*B*x)/(b*x^3+a),x,method=_RETURNVERBOSE)

[Out]

-B*b^(1/3)*(-a^(1/3)*(1/3/b/(a/b)^(2/3)*ln(x+(a/b)^(1/3))-1/6/b/(a/b)^(2/3)*ln(x^2-(a/b)^(1/3)*x+(a/b)^(2/3))+
1/3/b/(a/b)^(2/3)*3^(1/2)*arctan(1/3*3^(1/2)*(2/(a/b)^(1/3)*x-1)))+(-b)^(1/3)*(-1/3/b/(a/b)^(1/3)*ln(x+(a/b)^(
1/3))+1/6/b/(a/b)^(1/3)*ln(x^2-(a/b)^(1/3)*x+(a/b)^(2/3))+1/3*3^(1/2)/b/(a/b)^(1/3)*arctan(1/3*3^(1/2)*(2/(a/b
)^(1/3)*x-1))))*(-1)^(1/3)

Fricas [A] (verification not implemented)

none

Time = 0.46 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.78 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=\left [\sqrt {\frac {1}{3}} B \sqrt {-\frac {1}{a^{\frac {2}{3}}}} \log \left (\frac {2 \, b x^{3} + 3 \, a^{\frac {2}{3}} \left (-b\right )^{\frac {1}{3}} x - 3 \, \sqrt {\frac {1}{3}} {\left (2 \, a^{\frac {2}{3}} \left (-b\right )^{\frac {2}{3}} x^{2} - a \left (-b\right )^{\frac {1}{3}} x - a^{\frac {4}{3}}\right )} \sqrt {-\frac {1}{a^{\frac {2}{3}}}} - a}{b x^{3} + a}\right ), \frac {2 \, \sqrt {\frac {1}{3}} B \arctan \left (\frac {\sqrt {\frac {1}{3}} {\left (2 \, \left (-b\right )^{\frac {1}{3}} x + a^{\frac {1}{3}}\right )}}{a^{\frac {1}{3}}}\right )}{a^{\frac {1}{3}}}\right ] \]

[In]

integrate((a^(1/3)*(-b)^(1/3)*B-(-b)^(2/3)*B*x)/(b*x^3+a),x, algorithm="fricas")

[Out]

[sqrt(1/3)*B*sqrt(-1/a^(2/3))*log((2*b*x^3 + 3*a^(2/3)*(-b)^(1/3)*x - 3*sqrt(1/3)*(2*a^(2/3)*(-b)^(2/3)*x^2 -
a*(-b)^(1/3)*x - a^(4/3))*sqrt(-1/a^(2/3)) - a)/(b*x^3 + a)), 2*sqrt(1/3)*B*arctan(sqrt(1/3)*(2*(-b)^(1/3)*x +
 a^(1/3))/a^(1/3))/a^(1/3)]

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.15 (sec) , antiderivative size = 105, normalized size of antiderivative = 2.56 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=- \frac {B \left (- \frac {\sqrt {3} i \log {\left (- \frac {\sqrt [3]{a} \left (- b\right )^{\frac {2}{3}}}{2 b} - \frac {\sqrt {3} i \sqrt [3]{a} \left (- b\right )^{\frac {2}{3}}}{2 b} + x \right )}}{3} + \frac {\sqrt {3} i \log {\left (- \frac {\sqrt [3]{a} \left (- b\right )^{\frac {2}{3}}}{2 b} + \frac {\sqrt {3} i \sqrt [3]{a} \left (- b\right )^{\frac {2}{3}}}{2 b} + x \right )}}{3}\right )}{\sqrt [3]{a}} \]

[In]

integrate((a**(1/3)*(-b)**(1/3)*B-(-b)**(2/3)*B*x)/(b*x**3+a),x)

[Out]

-B*(-sqrt(3)*I*log(-a**(1/3)*(-b)**(2/3)/(2*b) - sqrt(3)*I*a**(1/3)*(-b)**(2/3)/(2*b) + x)/3 + sqrt(3)*I*log(-
a**(1/3)*(-b)**(2/3)/(2*b) + sqrt(3)*I*a**(1/3)*(-b)**(2/3)/(2*b) + x)/3)/a**(1/3)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 174 vs. \(2 (30) = 60\).

Time = 0.28 (sec) , antiderivative size = 174, normalized size of antiderivative = 4.24 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=-\frac {\sqrt {3} {\left (B \left (-b\right )^{\frac {2}{3}} \left (\frac {a}{b}\right )^{\frac {1}{3}} - B a^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {a}{b}\right )^{\frac {1}{3}}}\right )}{3 \, b \left (\frac {a}{b}\right )^{\frac {2}{3}}} - \frac {{\left (B \left (-b\right )^{\frac {2}{3}} \left (\frac {a}{b}\right )^{\frac {1}{3}} + B a^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}}\right )} \log \left (x^{2} - x \left (\frac {a}{b}\right )^{\frac {1}{3}} + \left (\frac {a}{b}\right )^{\frac {2}{3}}\right )}{6 \, b \left (\frac {a}{b}\right )^{\frac {2}{3}}} + \frac {{\left (B \left (-b\right )^{\frac {2}{3}} \left (\frac {a}{b}\right )^{\frac {1}{3}} + B a^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}}\right )} \log \left (x + \left (\frac {a}{b}\right )^{\frac {1}{3}}\right )}{3 \, b \left (\frac {a}{b}\right )^{\frac {2}{3}}} \]

[In]

integrate((a^(1/3)*(-b)^(1/3)*B-(-b)^(2/3)*B*x)/(b*x^3+a),x, algorithm="maxima")

[Out]

-1/3*sqrt(3)*(B*(-b)^(2/3)*(a/b)^(1/3) - B*a^(1/3)*(-b)^(1/3))*arctan(1/3*sqrt(3)*(2*x - (a/b)^(1/3))/(a/b)^(1
/3))/(b*(a/b)^(2/3)) - 1/6*(B*(-b)^(2/3)*(a/b)^(1/3) + B*a^(1/3)*(-b)^(1/3))*log(x^2 - x*(a/b)^(1/3) + (a/b)^(
2/3))/(b*(a/b)^(2/3)) + 1/3*(B*(-b)^(2/3)*(a/b)^(1/3) + B*a^(1/3)*(-b)^(1/3))*log(x + (a/b)^(1/3))/(b*(a/b)^(2
/3))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.39 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=-\frac {2 \, \sqrt {3} B \left (-b\right )^{\frac {1}{3}} \arctan \left (-\frac {\sqrt {3} {\left (2 \, \left (-b\right )^{\frac {2}{3}} x + a^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}}\right )}}{3 \, \sqrt {a^{\frac {2}{3}} \left (-b\right )^{\frac {2}{3}}}}\right )}{3 \, \sqrt {a^{\frac {2}{3}} \left (-b\right )^{\frac {2}{3}}}} \]

[In]

integrate((a^(1/3)*(-b)^(1/3)*B-(-b)^(2/3)*B*x)/(b*x^3+a),x, algorithm="giac")

[Out]

-2/3*sqrt(3)*B*(-b)^(1/3)*arctan(-1/3*sqrt(3)*(2*(-b)^(2/3)*x + a^(1/3)*(-b)^(1/3))/sqrt(a^(2/3)*(-b)^(2/3)))/
sqrt(a^(2/3)*(-b)^(2/3))

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.20 \[ \int \frac {\sqrt [3]{a} \sqrt [3]{-b} B-(-b)^{2/3} B x}{a+b x^3} \, dx=-\frac {2\,\sqrt {3}\,B\,\sqrt {-b}\,\mathrm {atanh}\left (\frac {\sqrt {3}\,\sqrt {-b}}{3\,\sqrt {b}}-\frac {2\,\sqrt {3}\,\sqrt {b}\,x}{3\,a^{1/3}\,{\left (-b\right )}^{1/6}}\right )}{3\,a^{1/3}\,\sqrt {b}} \]

[In]

int(-(B*(-b)^(2/3)*x - B*a^(1/3)*(-b)^(1/3))/(a + b*x^3),x)

[Out]

-(2*3^(1/2)*B*(-b)^(1/2)*atanh((3^(1/2)*(-b)^(1/2))/(3*b^(1/2)) - (2*3^(1/2)*b^(1/2)*x)/(3*a^(1/3)*(-b)^(1/6))
))/(3*a^(1/3)*b^(1/2))